package facilius.controller.action.material;

import facilius.model.ServiceLocator;
import facilius.model.pojo.Material;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mentawai.core.BaseAction;

/**
 *
 * @author Graciano
 */
public class MaterialShowFormAction extends BaseAction{

    @Override
    public String execute() throws Exception {
        Map<String,Object> criteria = new HashMap<String,Object>();
        criteria.put("aulaId", input.getLong("id"));
        
        List<Material> materiais = ServiceLocator.getMaterialService().readByCriteria(criteria);

        output.setValue("aulaId", input.getLong("id"));
        output.setValue("pojos", materiais);
        return SUCCESS;
    }


}
